package org.swimv2.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the richiestanuovaabilita database table.
 * 
 */
@Entity
@NamedQueries({
@NamedQuery(name="Richiestanuovaabilita.findPendente", query="SELECT r FROM Richiestanuovaabilita r WHERE r.stato='PENDENTE'"),
@NamedQuery(name="Richiestanuovaabilita.findByNome", query="SELECT r FROM Richiestanuovaabilita r WHERE r.nome=:nomeAbilita"),
@NamedQuery(name="Richiestanuovaabilita.findUtentiByRichiesta", query="SELECT u FROM Persona u,Richiestanuovaabilita r WHERE u MEMBER OF r.personas AND r.nome=:richiesta")
})
public class Richiestanuovaabilita implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String nome;

	private String stato;

	//bi-directional many-to-many association to Persona
	@ManyToMany(mappedBy="richiestanuovaabilitas")
	private List<Persona> personas;

	public Richiestanuovaabilita() {
	}

	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getStato() {
		return this.stato;
	}

	public void setStato(String stato) {
		this.stato = stato;
	}

	public List<Persona> getPersonas() {
		return this.personas;
	}

	public void setPersonas(List<Persona> personas) {
		this.personas = personas;
	}

}